gtk4.git
9 years agocss: Use setters for font size and family
Matthias Clasen [Sun, 1 May 2016 05:10:59 +0000 (01:10 -0400)]
css: Use setters for font size and family

This avoid creating pango font descriptions all the time, when
the gtk-font-name setting hasn't actually changed.

9 years agosettings: Add setters for font family and size
Matthias Clasen [Sun, 1 May 2016 05:10:33 +0000 (01:10 -0400)]
settings: Add setters for font family and size

9 years agotreeview: Use getter for gtk-enable-animations
Matthias Clasen [Sun, 1 May 2016 04:40:23 +0000 (00:40 -0400)]
treeview: Use getter for gtk-enable-animations

9 years agoswitch: Use getter for gtk-enable-animations
Matthias Clasen [Sun, 1 May 2016 04:40:08 +0000 (00:40 -0400)]
switch: Use getter for gtk-enable-animations

9 years agostack: Use getter for gtk-enable-animations
Matthias Clasen [Sun, 1 May 2016 04:39:55 +0000 (00:39 -0400)]
stack: Use getter for gtk-enable-animations

9 years agoscrolled window: Use getter for gtk-enable-animations
Matthias Clasen [Sun, 1 May 2016 04:39:34 +0000 (00:39 -0400)]
scrolled window: Use getter for gtk-enable-animations

9 years agoUse getter for gtk-enable-animations
Matthias Clasen [Sun, 1 May 2016 04:39:18 +0000 (00:39 -0400)]
Use getter for gtk-enable-animations

9 years agopopover: Use getter for gtk-enable-animations
Matthias Clasen [Sun, 1 May 2016 04:39:03 +0000 (00:39 -0400)]
popover: Use getter for gtk-enable-animations

9 years agoUse a variable consistently
Matthias Clasen [Sun, 1 May 2016 03:15:20 +0000 (23:15 -0400)]
Use a variable consistently

9 years agoUse a better hash for arcs
Matthias Clasen [Sun, 1 May 2016 02:39:26 +0000 (22:39 -0400)]
Use a better hash for arcs

9 years agocss: Use a getter for the enable-animations setting
Matthias Clasen [Sun, 1 May 2016 02:00:35 +0000 (22:00 -0400)]
css: Use a getter for the enable-animations setting

9 years agodnd: Use a getter for the drag threshold
Matthias Clasen [Sun, 1 May 2016 02:00:19 +0000 (22:00 -0400)]
dnd: Use a getter for the drag threshold

9 years agoAdd a few settings getters
Matthias Clasen [Sun, 1 May 2016 02:00:06 +0000 (22:00 -0400)]
Add a few settings getters

9 years agoTrivial whitespace fix
Matthias Clasen [Sun, 1 May 2016 01:06:38 +0000 (21:06 -0400)]
Trivial whitespace fix

9 years agoUse the new getter
Matthias Clasen [Sun, 1 May 2016 00:59:16 +0000 (20:59 -0400)]
Use the new getter

This avoids the use of generic api in the per-event code path.

9 years agogdk: Add a private getter for GdkDevice::input-mode
Matthias Clasen [Sun, 1 May 2016 00:52:09 +0000 (20:52 -0400)]
gdk: Add a private getter for GdkDevice::input-mode

9 years agoAdd a forgotten deprecation
Matthias Clasen [Sat, 30 Apr 2016 20:29:16 +0000 (16:29 -0400)]
Add a forgotten deprecation

gdk_display_get_screen is marked as deprecated in the docs.

9 years agoW32: support cairo library in non-standard locations
Руслан Ижбулатов [Fri, 29 Apr 2016 15:54:52 +0000 (15:54 +0000)]
W32: support cairo library in non-standard locations

When checking for cairo_win32_surface_create_with_format in -lcairo,
temporarily put CAIRO_LIBS into LIBS so that AC_CHECK_LIB() can
find it in weird places like /usr/local/lib, where gcc would not look
on its own.

https://bugzilla.gnome.org/show_bug.cgi?id=765793

9 years agoUpdated Scottish Gaelic translation
GNOME Translation Robot [Fri, 29 Apr 2016 08:41:50 +0000 (08:41 +0000)]
Updated Scottish Gaelic translation

9 years agoW32: reword the error about required cairo version
Руслан Ижбулатов [Fri, 29 Apr 2016 01:19:23 +0000 (01:19 +0000)]
W32: reword the error about required cairo version

1.14.x series does not contain the functionality needed by GTK+.
Advise to use 1.15.x (1.15.2 is available) or 1.16.x (yet to be released).

https://bugzilla.gnome.org/show_bug.cgi?id=765790

9 years agosettings: Cache xsettings
Matthias Clasen [Wed, 27 Apr 2016 04:00:19 +0000 (00:00 -0400)]
settings: Cache xsettings

Instead of calling out to gdk every time an XSetting is requested,
cache the value (we already have the property_values array
anyway).

https://bugzilla.gnome.org/show_bug.cgi?id=765579

9 years agobox gadget: Redo expand flag handling
Matthias Clasen [Fri, 29 Apr 2016 01:55:52 +0000 (21:55 -0400)]
box gadget: Redo expand flag handling

We only keep one align flag per child, so it seems odd to
keep separate h/v expand flags. Just keep one expand flag
and interpret it according to orientation. Allow setting
the expand flag for child widgets too, though, so we can
make widget expand without interfering with the recursive
widget expand flag.

Update all callers.

Use the new possibility of expanding child widgets to make
the label of check and radio buttons expand. This fixes
unexpected behavior of these widgets in RTL in some places.

https://bugzilla.gnome.org/show_bug.cgi?id=765742

9 years agoexpander: Reverse alignments in RTL
Matthias Clasen [Fri, 29 Apr 2016 01:30:01 +0000 (21:30 -0400)]
expander: Reverse alignments in RTL

Flip alignments of the title gadget children.

9 years agocheck button: Reverse alignments in RTL
Matthias Clasen [Fri, 29 Apr 2016 01:29:32 +0000 (21:29 -0400)]
check button: Reverse alignments in RTL

Flip alignments for the box gadget children.

9 years agobox gadget: allow reversing alignments
Matthias Clasen [Fri, 29 Apr 2016 01:27:02 +0000 (21:27 -0400)]
box gadget: allow reversing alignments

In RTL, we want to interpret GTK_ALIGN_START and _END
in the opposite way. Since we don't give gadgets a text
direction, just allow setting an align_reverse flag
to the box gadget.

9 years agoAdwaita: refactor levelbar styling.
Lapo Calamandrei [Thu, 28 Apr 2016 13:45:12 +0000 (15:45 +0200)]
Adwaita: refactor levelbar styling.

9 years agobroadway: Fix include rules in gdkbroadwaymonitor.h
Rico Tzschichholz [Thu, 28 Apr 2016 08:20:15 +0000 (10:20 +0200)]
broadway: Fix include rules in gdkbroadwaymonitor.h

Fixes 044109c8c73f5c1d9eb470c857112c08a005b0ae

9 years agoUpdated Spanish translation
Daniel Mustieles [Thu, 28 Apr 2016 08:06:10 +0000 (08:06 +0000)]
Updated Spanish translation

9 years agowindow: Stop using gdk_screen_get_n_monitors
Matthias Clasen [Mon, 11 Apr 2016 03:52:00 +0000 (23:52 -0400)]
window: Stop using gdk_screen_get_n_monitors

9 years agosettings: Stop comparing screen numbers
Matthias Clasen [Mon, 11 Apr 2016 03:44:05 +0000 (23:44 -0400)]
settings: Stop comparing screen numbers

There is only one screen.

9 years agowindow: Stop using screen width/height
Matthias Clasen [Mon, 11 Apr 2016 03:45:11 +0000 (23:45 -0400)]
window: Stop using screen width/height

9 years agotreeview: Stop using screen width/height
Matthias Clasen [Mon, 11 Apr 2016 03:44:28 +0000 (23:44 -0400)]
treeview: Stop using screen width/height

Popups should always be placed relative to a monitor.

9 years agolabel: Stop using screen width/height
Matthias Clasen [Mon, 11 Apr 2016 03:43:34 +0000 (23:43 -0400)]
label: Stop using screen width/height

Popups should always be placed relative to a monitor.

9 years agocombobox: Stop using screen width/height
Matthias Clasen [Mon, 11 Apr 2016 03:42:57 +0000 (23:42 -0400)]
combobox: Stop using screen width/height

Popups should always be placed relative to a monitor.

9 years agogtk: Port to new monitor api
Matthias Clasen [Mon, 11 Apr 2016 03:01:10 +0000 (23:01 -0400)]
gtk: Port to new monitor api

Use the GdkDisplay monitor api instead of the GdkScreen one.

9 years agomenu: Add new monitor api
Matthias Clasen [Mon, 11 Apr 2016 02:59:53 +0000 (22:59 -0400)]
menu: Add new monitor api

This will work better with the new monitor api in gdk.

9 years agoinspector: Port to new monitor api
Matthias Clasen [Sat, 2 Apr 2016 23:22:36 +0000 (19:22 -0400)]
inspector: Port to new monitor api

Adapt to new monitor apis, and show more information.

9 years agowin32: Port to new monitor api
Руслан Ижбулатов [Wed, 20 Apr 2016 07:36:00 +0000 (07:36 +0000)]
win32: Port to new monitor api

9 years agox11: Bring back fullscreen-on-all-monitors support
Matthias Clasen [Thu, 28 Apr 2016 03:08:25 +0000 (23:08 -0400)]
x11: Bring back fullscreen-on-all-monitors support

It is unfortunate the EWMH requires Xinerama here - lets do this
without the caching that was previously there, I don't think it is
needed.

9 years agox11: Port to new monitor api
Matthias Clasen [Sun, 3 Apr 2016 04:12:39 +0000 (00:12 -0400)]
x11: Port to new monitor api

9 years agox11: Drop Xinerama
Matthias Clasen [Sun, 3 Apr 2016 04:15:42 +0000 (00:15 -0400)]
x11: Drop Xinerama

It may come back after the monitor conversion.

9 years agobroadway: Port to new monitor api
Matthias Clasen [Sun, 3 Apr 2016 03:42:40 +0000 (23:42 -0400)]
broadway: Port to new monitor api

9 years agowayland: Port to new monitor api
Matthias Clasen [Sat, 2 Apr 2016 14:18:56 +0000 (10:18 -0400)]
wayland: Port to new monitor api

9 years agointegrate docs
Matthias Clasen [Thu, 28 Apr 2016 02:51:42 +0000 (22:51 -0400)]
integrate docs

9 years agoscreen: Implement old monitor apis generically
Matthias Clasen [Sat, 2 Apr 2016 14:18:16 +0000 (10:18 -0400)]
screen: Implement old monitor apis generically

Implement all the monitor-related GdkScreen apis based on GdkMonitor.

9 years agoAdd a fallback for unconverted backends
Matthias Clasen [Mon, 25 Apr 2016 13:07:56 +0000 (09:07 -0400)]
Add a fallback for unconverted backends

If the monitor vfuncs are not implemented in a display class,
fall back to providing a single monitor object representing
the entire screen. This is not meant to be 'good enough', it
is just to provide some implementation until all backends
implement the monitor vfuncs. When that is the case, the
fallback should be removed.

9 years agodisplay: Add new monitor apis
Matthias Clasen [Fri, 1 Apr 2016 03:10:37 +0000 (23:10 -0400)]
display: Add new monitor apis

This follows our general direction of moving functionality
from GdkScreen to GdkDisplay.

9 years agoAdd GdkMonitor
Matthias Clasen [Fri, 1 Apr 2016 03:10:04 +0000 (23:10 -0400)]
Add GdkMonitor

Add a simple object representing a monitor.

9 years agoRevert "iconhelper: check if surface was invalidated"
Christian Hergert [Thu, 28 Apr 2016 02:02:25 +0000 (19:02 -0700)]
Revert "iconhelper: check if surface was invalidated"

This reverts commit 88d02583974659d1d37d825df78c79bee4c95d0e.

9 years agoGtkTreeView: change child repositioning to preserve locality
Руслан Ижбулатов [Tue, 26 Apr 2016 21:45:15 +0000 (21:45 +0000)]
GtkTreeView: change child repositioning to preserve locality

If there was a piece of text in the cell, then when the edit
entry is shown for that cell, it should have a piece of text
in it roughly at the same location.

Therefore, when child widget is enlarged (child preferred
size exceeds cell size), extra width should be added by
extending either left or right edge depending on text direction.

If after that the child sticks outside of the treeivew visible region,
try to push it back inside (breaking its alignment with the
cell), again, giving preference (i.e. adjusting it last)
to either left or right edge depending on text direction.

https://bugzilla.gnome.org/show_bug.cgi?id=765471

9 years agoiconhelper: check if surface was invalidated
Christian Hergert [Thu, 28 Apr 2016 00:45:01 +0000 (17:45 -0700)]
iconhelper: check if surface was invalidated

Fetching the style may cause the surface to be invalidated.

9 years agoUpdated Hungarian translation
Balázs Meskó [Wed, 27 Apr 2016 19:32:14 +0000 (19:32 +0000)]
Updated Hungarian translation

9 years agoUpdated Spanish translation
Daniel Mustieles [Wed, 27 Apr 2016 19:07:11 +0000 (21:07 +0200)]
Updated Spanish translation

9 years agoAdwaita: add a background to cellrendertext
Lapo Calamandrei [Wed, 27 Apr 2016 18:04:39 +0000 (20:04 +0200)]
Adwaita: add a background to cellrendertext

9 years ago3.21.1
Matthias Clasen [Wed, 27 Apr 2016 11:37:56 +0000 (07:37 -0400)]
3.21.1

9 years agoUpdates
Matthias Clasen [Wed, 27 Apr 2016 11:37:43 +0000 (07:37 -0400)]
Updates

9 years agowayland: Ignore NoSymbol keys
Daniel Stone [Wed, 27 Apr 2016 12:06:38 +0000 (14:06 +0200)]
wayland: Ignore NoSymbol keys

NoSymbol is not a valid GDK symbol (it only has the concept of
VoidSymbol, for some reason, which is neither the same thing nor
produced by any sane keymap). Passing NoSymbol events through to GTK+
apps is unlikely to produce anything useful.

In particular, this meant VTE would scroll to the end of the buffer when
pressing Fn (required for Page Up/Down on Macs), as it was receiving a
keypress that wasn't a modifeir. This does not happen on X11, as the
KEY_FN keycode is above 255, so does not get sent to clients.

https://bugzilla.gnome.org/show_bug.cgi?id=764825

9 years agoplacesview: update a leftover function name
Georges Basile Stavracas Neto [Wed, 27 Apr 2016 12:06:46 +0000 (09:06 -0300)]
placesview: update a leftover function name

This should've been part of the previous commit.

9 years agoplacesview: follow up fixes
Georges Basile Stavracas Neto [Tue, 26 Apr 2016 12:57:36 +0000 (09:57 -0300)]
placesview: follow up fixes

This patch unmarks the addresses' prefixes as translatable,
and updates the callback name to reflect what it really does
now.

This is a follow up fix from commit 7449add82.

https://bugzilla.gnome.org/show_bug.cgi?id=756570

9 years agowayland: Perform seat grab focus checks on native windows
Carlos Garnacho [Wed, 27 Apr 2016 10:12:18 +0000 (12:12 +0200)]
wayland: Perform seat grab focus checks on native windows

We don't care about the specific (possibly client-side) window that
requested the focus here, only the toplevel. Fixes mistakenly sent
focus events when the grab happens inside the current focus window.

https://bugzilla.gnome.org/show_bug.cgi?id=762756

9 years agopixelcache: reuse existing timeout source when possible
Christian Hergert [Wed, 27 Apr 2016 02:30:30 +0000 (19:30 -0700)]
pixelcache: reuse existing timeout source when possible

This avoids the g_source_remove(), g_source_destroy(),
g_timer_source_new(), and g_source_set_name_by_id() in the common case.

Instead, we reuse our previous source and update the ready time to our
new deadline. We lose the coalescing with g_timeout_add_seconds(), but
that is not going to help in the common case anyway (unless you have
three hands and can scroll multiple pixelcached backed widgets at once).

https://bugzilla.gnome.org/show_bug.cgi?id=765640

9 years agoUpdated Spanish translation
Daniel Mustieles [Wed, 27 Apr 2016 07:47:56 +0000 (07:47 +0000)]
Updated Spanish translation

9 years agodnd: Fix some issues with drag icons
Matthias Clasen [Wed, 27 Apr 2016 02:02:34 +0000 (22:02 -0400)]
dnd: Fix some issues with drag icons

In non-composited environments, we were ending up with all-black
drag icons, because nothing was drawing the background of our new
toplevel. Fix this by drawing background when we are not composited.
We don't do this when composited, since we want to allow transparent
icons.

9 years agoFix indentation
Matthias Clasen [Wed, 27 Apr 2016 01:25:02 +0000 (21:25 -0400)]
Fix indentation

9 years agodnd: Set attributes from all widgets for text drag icons
Matthias Clasen [Wed, 27 Apr 2016 01:23:08 +0000 (21:23 -0400)]
dnd: Set attributes from all widgets for text drag icons

There is nothing textview-specific here.

9 years agoplacesview: provide guidance on server addresses
Georges Basile Stavracas Neto [Tue, 26 Apr 2016 12:57:36 +0000 (09:57 -0300)]
placesview: provide guidance on server addresses

GtkPlacesView currently provides no example of
server addresses, which may confuse users.

To fix that, add a helper popover with some
guidance on server addresses.

https://bugzilla.gnome.org/show_bug.cgi?id=756570

9 years agoprogressbar: Enforce invariants
Matthias Clasen [Wed, 27 Apr 2016 00:44:07 +0000 (20:44 -0400)]
progressbar: Enforce invariants

When measuring gadgets, minimum must come out <= natural.
Make sure we don't fail this when measuring progressbar text.

https://bugzilla.gnome.org/show_bug.cgi?id=765644

9 years agodnd: Fix lifecycle issues with widgets as drag icons
Matthias Clasen [Wed, 27 Apr 2016 00:35:25 +0000 (20:35 -0400)]
dnd: Fix lifecycle issues with widgets as drag icons

The documentation clearly says that the widget is not destroyed,
but we were in fact failing to keep it alive, since it was still
a child or the icon_window when we destroy that. Fix this by
reparenting the icon_widget out before. Also, deal with the
possibility that the application might destroy the widget
halfway through, for whatever reason.

9 years agotestdnd2: Actually test gtk_drag_set_icon_widget
Matthias Clasen [Wed, 27 Apr 2016 00:34:24 +0000 (20:34 -0400)]
testdnd2: Actually test gtk_drag_set_icon_widget

I added a new test function, but didn't actually use it.
No wonder I couldn't reproduce the lifecycle issues with
drag widgets that firefox is experiencing.

9 years agodocs: typo in GTK_STYLE_CLASS_LIST_ROW docs
Bernhard Reutner-Fischer [Tue, 26 Apr 2016 17:29:33 +0000 (19:29 +0200)]
docs: typo in GTK_STYLE_CLASS_LIST_ROW docs

Fix typo in documentation of GTK_STYLE_CLASS_LIST_ROW: s/rowss/rows/g

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
https://bugzilla.gnome.org/show_bug.cgi?id=765632

9 years agogdk/dnd: Don't use default display when getting cursor
Jonas Ådahl [Tue, 26 Apr 2016 07:31:33 +0000 (15:31 +0800)]
gdk/dnd: Don't use default display when getting cursor

Always associate a drag context with a GdkDisplay and use that when
getting a cursor for a given action.

If we don't do this, dragging on a window that doesn't use the default
display will make us use cursors from the wrong display.

https://bugzilla.gnome.org/show_bug.cgi?id=765565

9 years agoframetimings: reuse previous frame timing in common case
Christian Hergert [Tue, 26 Apr 2016 10:08:11 +0000 (03:08 -0700)]
frametimings: reuse previous frame timing in common case

Typically, there won't be any references on old frame timings except for
the most recent timing. So instead of discarding these and re-entering
gslice twice, just steal the old frame timing and reuse it.

https://bugzilla.gnome.org/show_bug.cgi?id=765592

9 years agogdk/dnd: Add missing signal parameter documentation
Jonas Ådahl [Tue, 26 Apr 2016 07:50:17 +0000 (15:50 +0800)]
gdk/dnd: Add missing signal parameter documentation

The cancel reason parameter was missing.

https://bugzilla.gnome.org/show_bug.cgi?id=765577

9 years agowayland: Track orphaned dialogs per display
Jonas Ådahl [Tue, 26 Apr 2016 03:46:25 +0000 (11:46 +0800)]
wayland: Track orphaned dialogs per display

Don't track all orphaned dialogs globally, as mixing them up with each
other would in most cases trigger errors when we try to pass bogus
values to Wayland requests.

https://bugzilla.gnome.org/show_bug.cgi?id=765474

9 years agowayland: Clean up naming of GdkWaylandDisplay pointers
Jonas Ådahl [Tue, 26 Apr 2016 03:16:56 +0000 (11:16 +0800)]
wayland: Clean up naming of GdkWaylandDisplay pointers

The naming of pointers to GdkWaylandDisplay's were inconsistent.
Running the following commands in gtk+/gdk/wayland illustrate the
inconsistency:

$ grep -r '\<display_wayland\>' *.[ch] | wc -l
195
$ grep -r '\<wayland_display\>' *.[ch] | wc -l
81

This patch renames all occurrences of "wayland_display" to
"display_wayland". This is also consistent with naming in the X11
backend. A couple of whitespace changes were done as well in places
where the rename was already done, that added line breaks to long lines
that stood out.

https://bugzilla.gnome.org/show_bug.cgi?id=765474

9 years agogdk/gdkglcontext.c: Avoid a GCCism
Chun-wei Fan [Tue, 26 Apr 2016 12:29:23 +0000 (20:29 +0800)]
gdk/gdkglcontext.c: Avoid a GCCism

Pointer arithmetic on GLvoid* (a void*) is a GCCism, so cast it to an
unsigned char*, which is the type cairo_image_surface_get_data() returns.

9 years agoVisual Studio builds: Generate .pc files
Chun-wei Fan [Tue, 26 Apr 2016 08:27:32 +0000 (16:27 +0800)]
Visual Studio builds: Generate .pc files

Generate .pc files for the package, so that it would be easier for
building introspection for packages that depend on GTK+.  Also split
PythonPath into PythonPath and PythonPathX64 to facilitate the build of
introspection files, which need to have Python that is built with the
same ac=rchitecture where GTK+ is built.

Clean up the formatting and spacing a bit.

9 years agoUpdated Hungarian translation
Gábor Kelemen [Tue, 26 Apr 2016 09:43:45 +0000 (09:43 +0000)]
Updated Hungarian translation

9 years agogdk: Ensure resources registration happens once
Emmanuele Bassi [Tue, 26 Apr 2016 08:10:03 +0000 (09:10 +0100)]
gdk: Ensure resources registration happens once

Like GTK does it.

https://bugzilla.gnome.org/show_bug.cgi?id=765576

9 years agoExpand the drag widget testcase
Matthias Clasen [Tue, 26 Apr 2016 04:19:02 +0000 (00:19 -0400)]
Expand the drag widget testcase

This adds a testcase which reuses the drag widget for multiple
drags.

9 years agoUpdates
Matthias Clasen [Tue, 26 Apr 2016 01:39:09 +0000 (21:39 -0400)]
Updates

9 years agolabel css style test: fix font syntax
Matthias Clasen [Tue, 26 Apr 2016 04:06:12 +0000 (00:06 -0400)]
label css style test: fix font syntax

9 years agoRemove debug spew
Matthias Clasen [Tue, 26 Apr 2016 04:04:55 +0000 (00:04 -0400)]
Remove debug spew

9 years agoFix css parser tests
Matthias Clasen [Tue, 26 Apr 2016 04:02:37 +0000 (00:02 -0400)]
Fix css parser tests

These tests were affected by the font and linear-gradient parsing
changes.

9 years agocss: Fix printing of images
Matthias Clasen [Tue, 26 Apr 2016 04:01:59 +0000 (00:01 -0400)]
css: Fix printing of images

When there is only a call in a fallback image, we were errnoneously
printing out a comma before it.

9 years agoRaleigh: Fix font syntax
Matthias Clasen [Tue, 26 Apr 2016 03:25:32 +0000 (23:25 -0400)]
Raleigh: Fix font syntax

9 years agonotify test: Skip GtkFontButton::font-name
Matthias Clasen [Tue, 26 Apr 2016 03:08:39 +0000 (23:08 -0400)]
notify test: Skip GtkFontButton::font-name

This is not freely settable.

9 years agofont button: Fix translation of font-name default
Matthias Clasen [Tue, 26 Apr 2016 03:08:03 +0000 (23:08 -0400)]
font button: Fix translation of font-name default

The default value should come out of regular translations, not
property translations.

9 years agowayland: avoid jitter in keyboard repeat
Christian Hergert [Tue, 26 Apr 2016 01:10:09 +0000 (18:10 -0700)]
wayland: avoid jitter in keyboard repeat

When synthesizing keyboard repeat, we can potentially drift further from
the mark depending on the timing of the frame callback and how long it
took to deliver the event.

This patch attempts to reduce this by tracking from a stable epoch the
time of our next keyboard repeat.

https://bugzilla.gnome.org/show_bug.cgi?id=765567

9 years agoGtkLabel: Use g_clear_object
Timm Bäder [Sun, 24 Apr 2016 08:46:03 +0000 (10:46 +0200)]
GtkLabel: Use g_clear_object

https://bugzilla.gnome.org/show_bug.cgi?id=765496

9 years agoGtkLabel: Don't manually iterate over link list
Timm Bäder [Sun, 24 Apr 2016 08:32:55 +0000 (10:32 +0200)]
GtkLabel: Don't manually iterate over link list

There are various functions to access links based on their index for
a11y. We can spare quite a few lines of code by just using
g_list_nth_data instead of iterating over the list ourselves.

https://bugzilla.gnome.org/show_bug.cgi?id=765496

9 years agobuiltinicon: avoid calculating font-metrics in vast majority of cases
Christian Hergert [Mon, 25 Apr 2016 07:22:54 +0000 (00:22 -0700)]
builtinicon: avoid calculating font-metrics in vast majority of cases

We perform lots of gadget allocations that require allocating a
GtkBuiltinIcon. One notable example is the scrollbar for a scrolled
window.

In the process of doing this, we often calculate baseline information that
isn't necessary. With how much this code path gets exercised, its worth
catching the result for the common case, which is that the font-description
has not changed and we are using the default language the application
was started with.

This simply caches the previous result and verifies that we can reuse it
with pango_font_description_hash() and a simple language check.

Numbers below are scrolling through a textview with GDK_KEY_Down.

Before:
      SELF CUMULATIVE    FUNCTION
[   0.08%] [   9.26%]    gtk_builtin_icon_get_preferred_size
[   0.01%] [   8.82%]      pango_context_get_metrics
[   0.02%] [   0.16%]      gtk_widget_get_pango_context
[   0.06%] [   0.06%]      pango_context_get_language
[   0.01%] [   0.02%]      g_type_check_instance_cast
[   0.02%] [   0.02%]      strlen
[   0.02%] [   0.02%]      pango_context_get_font_description
[   0.02%] [   0.02%]      g_list_foreach
[   0.01%] [   0.01%]      gtk_css_style_get_value
[   0.01%] [   0.01%]      itemize_with_font
[   0.01%] [   0.01%]      pango_context_get_type
[   0.01%] [   0.01%]      get_base_metrics
[   0.00%] [   0.01%]      pango_font_metrics_unref
[   0.01%] [   0.01%]      g_list_free
[   0.01%] [   0.01%]      gtk_builtin_icon_get_type

After:
      SELF CUMULATIVE    FUNCTION
[   0.08%] [   0.18%]    gtk_builtin_icon_get_preferred_size
[   0.02%] [   0.02%]      pango_font_description_hash
[   0.00%] [   0.02%]      gtk_widget_get_pango_context
[   0.00%] [   0.02%]        g_object_get_qdata
[   0.00%] [   0.02%]          g_datalist_id_get_data
[   0.02%] [   0.02%]      gtk_builtin_icon_get_type
[   0.01%] [   0.01%]      pango_context_get_font_description
[   0.00%] [   0.01%]      - - kernel - -
[   0.01%] [   0.01%]      pango_context_get_language
[   0.00%] [   0.01%]      gtk_css_style_get_value
[   0.00%] [   0.01%]      gtk_css_gadget_get_style

https://bugzilla.gnome.org/show_bug.cgi?id=765486

9 years agodocs: Add new GtkGLArea symbols
Emmanuele Bassi [Sat, 23 Apr 2016 09:34:53 +0000 (10:34 +0100)]
docs: Add new GtkGLArea symbols

9 years agodocs: Add new GdkGLContext symbols
Emmanuele Bassi [Sat, 23 Apr 2016 09:34:14 +0000 (10:34 +0100)]
docs: Add new GdkGLContext symbols

9 years agodocs: Clarify the platform-dependency of GdkGLContext:use-es
Emmanuele Bassi [Sat, 23 Apr 2016 09:33:08 +0000 (10:33 +0100)]
docs: Clarify the platform-dependency of GdkGLContext:use-es

Not all platforms allow creating an OpenGL ES context.

9 years agoglarea: Use the appropriate texture format for GLES
Emmanuele Bassi [Mon, 25 Apr 2016 11:28:41 +0000 (12:28 +0100)]
glarea: Use the appropriate texture format for GLES

The core OpenGL ES spec does not have GL_BGRA, so we need to make do
with GL_RGBA and live with the format conversion.

9 years agoglarea: Relay the use-es flag to context creation
Emanuele Aina [Mon, 18 Apr 2016 14:15:27 +0000 (16:15 +0200)]
glarea: Relay the use-es flag to context creation

https://bugzilla.gnome.org/show_bug.cgi?id=743746

9 years agodemo: Add GLES support to the GtkGLArea demo
Emmanuele Bassi [Sat, 23 Apr 2016 12:46:05 +0000 (13:46 +0100)]
demo: Add GLES support to the GtkGLArea demo

We need new shaders, and we need to select the correct shader when
building the program we use to render the triangle.

9 years agotests: Add GLES support to GtkGears
Emmanuele Bassi [Sat, 23 Apr 2016 11:31:15 +0000 (12:31 +0100)]
tests: Add GLES support to GtkGears

Use the appropriate GLSL shaders when running under an OpenGL ES
context.

9 years agotests: Add GLES shaders to testglarea
Emmanuele Bassi [Fri, 22 Apr 2016 12:53:16 +0000 (13:53 +0100)]
tests: Add GLES shaders to testglarea

Check if the GdkGLContext is using ES, and load the appropriate shaders
in that case.